
(define (accumulate op initial sequence)
  (if (null? sequence)
    initial
    (op (car sequence)
        (accumulate op initial (cdr sequence)))))

(display
  (fold-left * 1 '(1 2 3 4 5))) ; 120
(display
  (fold-left (lambda (x y) (* x y)) 1 '(1 2 3 4 5))) ; 120
